<?php

namespace App\Utils;

class Utils
{
    /**
     * 获取当前时间的时间戳
     * @return int
     */
    public static function getTimestamp()
    {
        return time();
    }
    // 生成UUID
    public static function uuid()
    {
        return md5(uniqid());
    }
    // 返回响应
    public static function response($data, $code = 200, $msg = "成功")
    {
        echo json_encode(array("code" => $code, "data" => $data, "msg" => $msg), JSON_UNESCAPED_UNICODE);
    }
}
